package com.gjt.dlmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gjt.common.utils.PageUtils;
import com.gjt.dlmall.product.entity.AttrEntity;
import com.gjt.dlmall.product.vo.AttrGroupRelationVO;
import com.gjt.dlmall.product.vo.AttrRespVo;
import com.gjt.dlmall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 属性表
 *
 * @author gjt
 * @email g45852139@163.com
 * @date 2021-09-02 23:10:21
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);


    void saveAttr(AttrVo attrVo);

    /**
     * 分页 搜索
     * @param params
     * @param categoryId
     * @param attrType
     * @return
     */
    PageUtils queryBaseAttrPage(Map<String, Object> params, Long categoryId, String attrType);

    /**
     * 信息
     * @param id
     * @return
     */
    AttrRespVo getAttrInfo(Long id);

    /**
     * 基本属性的提交
     * @param attrVo
     */
    void updateAttr(AttrVo attrVo);

    List<AttrEntity> getRelationAttr(Long attrGroupId);

    void deleteRelation(AttrGroupRelationVO[] vos);

    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrGroupId);
}

